#web前台路由
from django.conf.urls import url
from . import views

urlpatterns = [

	####访问页面路由
	#首页index路由
    url(r'^index/$',views.index_page,name='web_index_page'),

    ###商品
    #商品列表页路由
    url(r'^list/$',views.list_page,name='web_list_page'),
    #商品详情页路由
    url(r'^detail/$',views.detail_page,name='web_detail_page'),

    ###登录
    #访问登录页面
    url(r'^login/$',views.login_page,name='web_login_page'),
    #访问注册页面
    url(r'^register/$',views.register_page,name='web_register_page'),

    ###购物车
    #获取购物车页面
    url(r'^cart/$',views.cart_page,name='web_cart_page'),

    ###订单
    #获取确认订单页面
    url(r'^cartconfirm/$',views.cartconfirm_page,name='web_cartconfirm_page'),
    #获取支付页面
    url(r'^payme/$',views.payme_page,name='web_payme_page'),
    #获取我的订单页面
    url(r'^myorder/$',views.myorder_page,name='web_myorder_page'),


    





    ####执行动作路由
    ###登录
    #执行登录
    url(r'^do_login/$',views.do_login,name='web_do_login'),
    #执行注册
    url(r'^do_register/$',views.do_register,name='web_do_register'),
    #注销登录状态
    url(r'^do_logout/$',views.do_logout,name='web_do_logout'),

    ###购物车
    #购物车添加
    url(r'^add_cart/$',views.add_cart,name='web_add_cart'),
    #清除购物车(清除session)
    url(r'^clear_cart/$',views.clear_cart,name='web_clear_cart'),
    #清除购物车中的单个商品
    url(r'^del_cart/$',views.del_cart,name='web_del_cart'),
    #更新购物车信息
    url(r'^edit_cart/$',views.edit_cart,name='web_edit_cart'),

    ###订单
    #创建订单
    url(r'^create_order/$',views.create_order,name='web_create_order'),





]
